This patch fixes the "sf probe" command. The very first SPI flash probe
passes, for instance when u-boot tries to read its environment settings
from a (Q)SPI memory but next "sf probe" commands fail because the flash
memory node is unbound from the SPI controller children nodes.
Signed-off-by: Cyrille Pitchen <[email protected]>
Signed-off-by: Wenyou Yang <[email protected]>
Tested-by: Stefan Roese <[email protected]>
Tested-by: Hannes Schmelzer <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
ret = spi_find_bus_and_cs(bus, cs, &bus_dev, &new);
if (!ret) {
device_remove(new);
- device_unbind(new);
}
flash = NULL;
ret = spi_flash_probe_bus_cs(bus, cs, speed, mode, &new);